import { Body, Controller, Get, Post, Query } from '@nestjs/common';
import { ApiOperation } from '@nestjs/swagger';
import { GetLoveDayListDTO, HandleLoveDayDTO } from './love-day.dto';
import { LoveDayService } from './love-day.service';

@Controller({
  path: 'wechat/loveDay',
  version: '1',
})
export class LoveDayController {
  constructor(private readonly loveDayService: LoveDayService) {}

  @Get('list')
  @ApiOperation({ summary: '获取纪念日列表' })
  async getLoveDayList(@Query() param:GetLoveDayListDTO) {
    const {UserSysID=-1}=param
    return await this.loveDayService.getLoveDayList(UserSysID);
  }

  @Post('handleLoveDay')
  @ApiOperation({ summary: '操作纪念日' })
  async handleLoveDay(@Body() handleLoveDay:HandleLoveDayDTO){
    return await this.loveDayService.handleLoveDay(handleLoveDay);
  }
}
